package com.eet.elasticsearch.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 用户实体类
 *
 * @author Administrator
 */
@Data
@NoArgsConstructor
public class User {

    private String id;


    private String userName;


    private Integer age;


    private Date birthday;


    private String description;

    /**
     * 1对多在spring-data-elasticsearch 统一为nested类型
     **/
    private List<Role> roles;

    public User(String userName,Integer age,Date birthday,String description) {
        this.userName = userName;
        this.age = age;
        this.birthday = birthday;
        this.description = description;
    }
}
